@extends('default.template')

@section('title',$result['title'])
<style scoped>
    .ad_img{
        width: 100%;
        margin-bottom:60px;
    }

    .news .list-group{
        width: 280px;
    }
    .news .list-group-item{
        height: 60px;
        border: none;
        border-bottom: 1px solid #a17656;
        margin-bottom: 0;
        font-size: 18px;
        color: #a17656;
        border-radius: 0 !important;

    }
    .news .list-group-item img{
        margin-right: 20px;
    }
    .news .list-group-item img:last-child{
        position: absolute;
        right: 0;
        top: calc(50% - 5px);
    }
    .news .list-group-item:hover{
        color: #a17656;
    }
    .news .list-group-item.active{
        background-color: #a17656 !important;
        border-color: #a17656 !important;
    }
    .news .list-group-item.active{
        height: 100px;
    }
    .news .list-group-item.active p{
        margin: 0;
        font-size: 20px;
    }
    .news .list-group-item.active p:first-child{
        margin-top: 8px;
        line-height: 36px;
        font-size: 20px;
    }
    .news .list-group-item.active:hover{
        color: white;
    }
    .news .bottom{
        height: 10px;
        background: #a17656;
        margin-top: 20px;
        padding: 0;

    }
    .news .bottom:hover{
        background: #a17656 !important;
    }
    .news-top-div{
        height: 76px;
        line-height: 76px;
        border-bottom: 4px solid #a17656;
    }
    .cate_name{
        font-size: 20px;
        color: #543e4e;
        height: 76px;
    }
    .breadcrumb{
        padding: 0 !important;
        background-color: unset !important;
    }
    .news nav{
        background: unset;
    }
    ol.breadcrumb,ol a{
        font-size: 14px;
        color: #a17656;
    }
    .news.list-group-item{
        width: 280px;
    }
    .news nav{
        width: unset;
    }
    .news{
        max-width: 1200px !important;
    }
    .news-top-div,.news-list-div{
        margin-left: 20px !important;
        padding: 0;
    }
    .news-top-div .col:first-child{
        padding-left: 10px;
    }

    .news-list-div .list-group-item{
        height: 140px;
        padding: 0;
        padding-left: 10px;

    }
    .news_date p{
        line-height: 24px;
        font-size: 20px;
        color: #a17656;
    }
    .news_date p:first-child{
        margin-top: 20px;
        line-height: 36px;
        margin-bottom: 0;
        font-size: 24px;
    }
    .product-list-div{
        padding-left: 20px;
        padding-top: 30px;
    }
    .card-div{
        padding: 0 !important;
    }
    .card-div .card{
        box-shadow:  7px 7px 10px  rgba(161,118,97,0.15);
        border: none;
    }
    .card-div .card-img-top{
        width: 260px;
        height: 240px;
    }
    .card-div .card-body{
        padding: 0;
        width: 260px;
    }
    .card-div .card-body h5{
        padding: 0;
        margin-bottom: 0;
        text-align: center;
        font-size: 18px;
        color: #543e2e;
        line-height: 40px;
        background: #FFF;
    }
    .card-div .card-body p{
        text-align: center;
        line-height: 30px;
        font-size: 14px;
        color: #a17656;
        margin: 0;
        background: #FFF;
    }
    .row .w100{
        height: 40px;
        width: 100% ;
    }
    @media (min-width: 576px) {  }

    /*// Medium devices (tablets, 768px and up)*/
    @media (min-width: 768px) {  }

    /*// Large devices (desktops, 992px and up)*/
    @media (min-width: 992px) {  }

    /*// Extra large devices (large desktops, 1200px and up)*/
    @media (min-width: 1200px) {

    }
</style>
@section('template')
    <img class="ad_img" src="{{$result['ad'][0]->ad_value}}" alt="">
    <div class="container news">
        <div class="row">
            <div class="col-3">

                <div class="list-group">
                    <a href="#" class="list-group-item list-group-item-action flex-column align-items-start active">
                        <p>产品展示</p>
                        <p>PRODUCT</p>
                    </a>
                    @foreach($result['menu'] as $k=>$v)
                        <a href="./product?uid={{$v->uid}}" class="list-group-item list-group-item-action flex-column align-items-start">
                            <img src="./dot.png" alt="">{{$v->cate_name}}
                            <img class="" src="./more.png" alt="">
                        </a>
                    @endforeach
                    <div class="list-group-item list-group-item-action flex-column align-items-start bottom"></div>
                </div>

            </div>
            <div class="col-9">
                <div class="row  news-top-div">
                    <div class="col"><span class="cate_name align-middle">产品展示</span></div>
                    <div class="col">
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb justify-content-end">
                                当前位置：
                                <li class="breadcrumb-item"><a href="./product">产品展示</a></li>
                                @foreach(array_reverse($result['parent']) as $k=>$v)
                                    <li class="breadcrumb-item"><a href="./product?uid={{$v->uid}}">{{$v->cate_name}}</a></li>
                                @endforeach
                            </ol>
                        </nav>
                    </div>
                </div>
                <div class="product-list-div">
                    <div class="container">
                        <div class="row">
                            @foreach($result['list'] as $k=>$v)
                            <div class="col-sm-4 card-div">
                                @if($k%3==0)
                                <div class="card" style="width: 90%;margin:0;">
                                @elseif($k%3==1)
                                <div class="card" style="width: 90%;margin:0 auto;">
                                @elseif($k%3==2)
                                <div class="card" style="width: 90%;margin-left:10%;">
                                @endif

                                    <img class="card-img-top" src="{{$v->goods_file1}}" alt="Card image cap">
                                    <div class="card-body">
                                        <h5 class="card-title">{{$v->goods_name}}</h5>
                                        <a href="./product/detail?uid={{$v->uid}}">
                                            <p>查看详情>></p>
                                        </a>
                                    </div>
                                </div>
                            </div>
                            @if($k%3==2)
                            <div class="w100"></div>
                            @endif
                            @endforeach
                        </div>
                    </div>
                </div>
                        @if(isset($result['parent'][0]->uid))
                            {{ $result['list']->appends(['uid'=>$result['parent'][0]->uid])->links() }}
                        @else
                            {{ $result['list']->links() }}
                        @endif
            </div>
        </div>
    </div>




@endsection































{{--@extends('default.template')--}}

{{--@section('title',$result['title'])--}}

{{--@section('template')--}}
    {{--<div class="container">--}}
        {{--@foreach ($result['list'] as $v)--}}
            {{--<a href="./product/detail?uid={{$v->uid}}">{{ $v->goods_name }}</a>--}}
        {{--@endforeach--}}
    {{--</div>--}}

    {{--{{ $result['list']->appends(['page_name' => '2','uid'=>2])->links() }}--}}
{{--@endsection--}}